import request from '@/utils/request'
// 获取学生列表
export const getStudentData = () => {
  return request({
    url: '/student/list',
    method: 'get'
  })
}
// 添加学生
export const addStudent = (data) => {
  return request({
    url: '/student/add',
    method: 'post',
    data
  })
}
// 删除学生
export const delStudent = (id) => {
  return request({
    url: 'student/delete',
    method: 'delete',
    params: { id }
  })
}
// 修改学生
export const editStudent = (data) => {
  return request({
    url: 'student/update',
    method: 'put',
    data
  })
}
// 获取学生详情
export const getStudentDetail = (id) => {
  return request({
    url: '/student/one',
    method: 'get',
    params: { id: id }
  })
}
